<template>
    <ul class="todo-main">
        <Item v-for="(item) in todos" :key="item.id" :todo="item" 
        @handleCheckBox="handleCheckBox"
        @handleDelete="handleDelete"/>
    </ul>
</template>

<script>
import Item from './Item.vue'
export default{
  props:['todos'],
  data(){
    return {
    }
  },
  created(){
  },
  components:{
    Item
  },
  methods:{
    handleCheckBox(id,done){
      this.$emit("handleCheckBox",id,done)
    },
    handleDelete(id){
      this.$emit("handleDelete",id)
    }
  }
}
</script>

<style>
</style>
